package com.bwie.auth.controller;

import com.bwie.auth.feign.SystemFeignService;
import com.bwie.auth.service.AuthService;
import com.bwie.common.domain.pojo.User;
import com.bwie.common.domain.response.JwtResponse;
import com.bwie.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Gd
 * @package: com.bwie.auth.controller
 * @Project: zg5_goods
 * @Name: AuthController
 * @Date: 2024/4/29 17:06
 */
@RestController
public class AuthController {

    @Autowired
    private AuthService authService;

    /**
     * 登录
     * @param user
     * @return
     */
    @PostMapping("login")
    public Result<JwtResponse> login(@RequestBody User user){
       return authService.login(user);
    }
}
